package com.wxb.hello.email.config;

import com.wxb.hello.email.service.MailService;
import com.wxb.hello.email.service.impl.MailServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * describe:
 *
 * @author : 王校兵
 * @version : v1.0
 * @time : 2017-12-01 16:25
 */
@Configuration
public class BeanInitAndDestoryMethodDemoConfig {

    @Bean(name = "mailService",initMethod = "init",destroyMethod = "close")
    public MailService createMailService() {
        return new MailServiceImpl();
    }
}
